<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<%
Integer pageInteger=(Integer)pageContext.getAttribute("pageIndex");
Integer requestInteger=(Integer)request.getAttribute("requestIndex");
Integer sessionInteger=(Integer)session.getAttribute("sessionIndex");
Integer applicationInteger=(Integer)application.getAttribute("applicationIndex");

int pageValue=pageInteger!=null? pageInteger.intValue()+1: 1;
int requestValue= requestInteger!=null? requestInteger.intValue() + 1 : 1;
int sessionValue=sessionInteger!=null?sessionInteger.intValue()+1:1;
int applicationValue=applicationInteger!=null?applicationInteger.intValue()+1 : 1;

out.println("pageIndex:"+pageValue+"</br>");
out.println("requestIndex:"+requestValue+"</br>");
out.println("sessionIndex:"+sessionValue+"</br>");
out.println("application:"+applicationValue+"</br>");
%>

<a href="start.jsp">start page</a>

</body>
</html>